package br.com.globalcode.clinicafacil.apresentacao.paciente;

import javax.swing.JFrame;

import br.com.globalcode.clinicafacil.apresentacao.dentista.DentistaFrm;
import br.com.globalcode.clinicafacil.config.Configurador;
import br.com.globalcode.clinicafacil.controle.PacienteController;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;

public class PacienteForm extends JFrame {
	
	private PacienteController controller;
	
	public PacienteForm() {

		controller = new PacienteController(this);
		
		JPanel panel = new JPanel();
		GroupLayout groupLayout = new GroupLayout(getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(panel, GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE)
					.addContainerGap())
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(panel, GroupLayout.DEFAULT_SIZE, 240, Short.MAX_VALUE)
					.addContainerGap())
		);
		GroupLayout gl_panel = new GroupLayout(panel);
		gl_panel.setHorizontalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGap(0, 414, Short.MAX_VALUE)
		);
		gl_panel.setVerticalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGap(0, 240, Short.MAX_VALUE)
		);
		panel.setLayout(gl_panel);
		getContentPane().setLayout(groupLayout);
				
	}
	
	
	public String getTxtNome() {
		return "Edu";
	}
	
	public String getTxtCpf () {
		return "3456754645-132";
	}
	
	/**
	 * Integer.parseInt( String value )
	 * @return
	 */
	public String getLblId() {
		return "0";
	}
	
	public void botaoSalvar() {
		controller.actionPerformed("SALVAR");
	}
	
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					PacienteForm frame = new PacienteForm();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
	
}
